var Dog = require('./dog.js');
var dog = new Dog('taidy', 6);
var dogg = new Dog('zangao', 5);
dog.on('bark', function () {
    console.log(this.name + ' ' + 'barked!' + ' ' + 'energy:' + this.energy);
})
dogg.on('bark', function () {
    console.log(this.name + ' ' + 'barked!' + ' ' + 'energy:' + this.energy);
})